/**
 * 
 */
package demo.tellurium.test.widget;

import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

import demo.tellurium.framework.BaseTelluriumMockJUnitTestCase;
import demo.tellurium.module.widget.ComboBoxDemo;

/**
 * @author roger.xu
 * 
 */
public class ComboBoxWidgetJUnitTestCase extends BaseTelluriumMockJUnitTestCase {
    private static final String HTML_NAME = "widget";

    private static ComboBoxDemo demo;

    @BeforeClass
    public static void initUi() {
        registerHtml(HTML_NAME);

        demo = new ComboBoxDemo();
        demo.defineUi();
    }

    @Test
    public void connectTo() {
        connect(HTML_NAME);
        demo.waitForPageToLoad(30000);
    }

    @Test
    public void testClickList() {
        console.debug("[testClickList]");

        demo.doClickComboBox(1);
        pauseSec(5);
        String value = demo.getComboBoxValue();
        console.debug("value=", value);
        Assert.assertNotNull(value);
    }
}
